﻿<UserControl x:Class="CodeStash.Addin.Controls.AsyncFailedUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
    Height="Auto" Width="Auto" 
    HorizontalAlignment="Stretch" 
    VerticalAlignment="Stretch">

    
    <UserControl.Resources>

        <ImageSource PresentationOptions:Freeze="true"
                     x:Key="errorImage">/CodeStash.Addin;component/Images/error.png</ImageSource>


    </UserControl.Resources>

    <Border Background="White"
            BorderThickness="1"
            BorderBrush="Black">

        <Grid Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
            Background="White">
            
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>



            <Border Background="Black"
                    Grid.Row="0"
                    BorderThickness="1"
                    BorderBrush="Black"
                    Height="30">

                <Label Content="Failed"
                       HorizontalContentAlignment="Left"
                       VerticalContentAlignment="Center"
                       Padding="0"
                       Margin="5"
                       FontWeight="Bold"
                       Foreground="White"
                       HorizontalAlignment="Left" />
            </Border>





            <Grid Grid.Row="1"
                  VerticalAlignment="Center"
                  HorizontalAlignment="Center" 
                  Margin="30">

                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>


                <Image Source="{StaticResource errorImage}"
                       HorizontalAlignment="Right"
                       Margin="5"
                       Width="64"
                       Height="64"
                       VerticalAlignment="Center" />

                <TextBox x:Name="txtError"
                         Grid.Column="1"
                         TextWrapping="Wrap"
                         BorderThickness="0"
                         Margin="5"
                         Foreground="Black"
                         BorderBrush="Transparent"
                         Background="Transparent"
                         IsReadOnly="True"
                         HorizontalAlignment="Stretch"
                         VerticalAlignment="Center" />



            </Grid>




        </Grid>
    </Border>

</UserControl>
